home *** CD-ROM | disk | FTP | other *** search
/ BMUG PD-ROM A / PD-ROM A.iso / HyperCard / Education / GCFactor 1.0 / card_2885.txt < prev    next >
Encoding:
Text File  |  1991-05-29  |  4.3 KB  |  168 lines

  1. -- card: 2885 from stack: in.0
  2. -- bmap block id: 3265
  3. -- flags: 0000
  4. -- background id: 2651
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: 8003
  11. -- rect: left=192 top=128 right=150 bottom=292
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: GCFactor
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   put "" into field factor
  23.   put 0 into mabeyfactor
  24.   put 0 into x
  25.   put "" into field factor2
  26.   put 0 into mabeyfactor2
  27.   put 0 into x2
  28.   repeat until mabeyfactor = card field #
  29.     put mabeyfactor + 1 into mabeyfactor
  30.     if round(card field "#"/ mabeyfactor) = card field "#"/ mabeyfactor then put x + 1 into x
  31.     if round(card field "#"/ mabeyfactor) =card field "#"/mabeyfactor then put mabeyfactor into line x of field "factor"
  32.   end repeat
  33.   repeat until mabeyfactor2 = card field "#2"
  34.     put mabeyfactor2 + 1 into mabeyfactor2
  35.     if round(card field "#2"/ mabeyfactor2) = card field "#2"/mabeyfactor2 then put x2 + 1 into x2
  36.     if round(card field "#2"/mabeyfactor2)=card field "#2"/mabeyfactor2 then put mabeyfactor2 into line x2 of field "factor2"
  37.   end repeat
  38.   put x into y
  39.   put x2 into y2
  40.   repeat x times
  41.     repeat x2 times
  42.       if y2 = 0 then put x2 into y2
  43.       if line y of field factor = line y2 of field factor2 then put line y of field factor into card field GCF
  44.       if line y of field factor = line y2 of field factor2 then exit mouseUp
  45.       put y2 - 1 into y2
  46.     end repeat
  47.     put y - 1 into y
  48.   end repeat
  49. end mouseUp
  50.  
  51.  
  52.  
  53. -- part 2 (button)
  54. -- low flags: 00
  55. -- high flags: 0000
  56. -- rect: left=30 top=262 right=299 bottom=76
  57. -- title width / last selected line: 0
  58. -- icon id / first selected line: 1011 / 1011
  59. -- text alignment: 1
  60. -- font id: 0
  61. -- text size: 12
  62. -- style flags: 0
  63. -- line height: 16
  64. -- part name: Home
  65. ----- HyperTalk script -----
  66. on mouseUp
  67.   doMenu Home
  68. end mouseUp
  69.  
  70.  
  71.  
  72.  
  73. -- part 3 (button)
  74. -- low flags: 00
  75. -- high flags: 0000
  76. -- rect: left=417 top=262 right=299 bottom=463
  77. -- title width / last selected line: 0
  78. -- icon id / first selected line: 14767 / 14767
  79. -- text alignment: 1
  80. -- font id: 0
  81. -- text size: 12
  82. -- style flags: 0
  83. -- line height: 16
  84. -- part name: Info
  85. ----- HyperTalk script -----
  86. on mouseUp
  87.   show card field Info
  88. end mouseUp
  89.  
  90.  
  91.  
  92. -- part 4 (field)
  93. -- low flags: 00
  94. -- high flags: 0002
  95. -- rect: left=110 top=171 right=190 bottom=156
  96. -- title width / last selected line: 0
  97. -- icon id / first selected line: 0 / 0
  98. -- text alignment: 0
  99. -- font id: 3
  100. -- text size: 12
  101. -- style flags: 0
  102. -- line height: 16
  103. -- part name: #
  104.  
  105.  
  106. -- part 5 (field)
  107. -- low flags: 00
  108. -- high flags: 0002
  109. -- rect: left=212 top=191 right=210 bottom=274
  110. -- title width / last selected line: 0
  111. -- icon id / first selected line: 0 / 0
  112. -- text alignment: 0
  113. -- font id: 3
  114. -- text size: 12
  115. -- style flags: 0
  116. -- line height: 16
  117. -- part name: GCF
  118.  
  119.  
  120. -- part 6 (field)
  121. -- low flags: 00
  122. -- high flags: 0002
  123. -- rect: left=329 top=169 right=188 bottom=375
  124. -- title width / last selected line: 0
  125. -- icon id / first selected line: 0 / 0
  126. -- text alignment: 0
  127. -- font id: 3
  128. -- text size: 12
  129. -- style flags: 0
  130. -- line height: 16
  131. -- part name: #2
  132.  
  133.  
  134. -- part 16 (field)
  135. -- low flags: 81
  136. -- high flags: 0004
  137. -- rect: left=93 top=35 right=329 bottom=404
  138. -- title width / last selected line: 0
  139. -- icon id / first selected line: 0 / 0
  140. -- text alignment: 0
  141. -- font id: 3
  142. -- text size: 12
  143. -- style flags: 0
  144. -- line height: 16
  145. -- part name: Info
  146. ----- HyperTalk script -----
  147. on mouseUp
  148.   hide card field Info
  149. end mouseUp
  150.  
  151.  
  152. -- part contents for card part 16
  153. ----- text -----
  154.                            GCFACTOR 1.0
  155.  
  156.      GCFactor 1.0 was programmed by David Johnson.  It will factor and give the GCF of any two numbers you enter.  If you only want to factor one number then put that number into one of the "Enter #" fields and delete anything in the other "Enter #" field.  Send any comments or complaints to the address below or E-Mail me at America Online(David 171).  If you send your shareware dues then you will recieve the complete source code and a free update.  Please send five dollars, a disk (for update), and your return adress to:
  157.                         
  158.                        David Johnson
  159.                        3716 Old Leeds Road
  160.                        Birmingham, AL 35213
  161.  
  162. -- part contents for card part 4
  163. ----- text -----
  164. 0
  165.  
  166. -- part contents for card part 6
  167. ----- text -----
  168. 0